<div style="max-height:300px;overflow-y:scroll;">
    <if condition="$failure">
    <div style="height: 240px;">
        <div class="errorwrapper" style="text-align: center; font-size: 18px; border:0; margin-top: 51px;">
            <if condition="$record_not_found">
                亲！实在抱歉系统同步淘宝API失败，请点击下方按钮同步数据
            <else/>
                亲！实在抱歉系统出错，请点击下方按钮同步数据
            </if>
        </div>
        <div style="font-size:15px;text-align: center;">
            <a href="javascript:void(0)" class="btn btn3 btn_grey manul-sync" data-adgroup_id="{$ad_id}">点击按钮</a>
        </div>
    </div>
<else/>
    <table cellspacing="0" cellpadding="0" border="0" class="metrotable datatable fixed-header" style="position:fixed;">
        <thead>
        <tr style="height:51px;">
            <th class="head0" style="width: 5%;"><input type="checkbox" class="checkall" /></th>
            <th class="head1" style="width: 25%;">关键词</th>
            <th class="head0 sortable" data-sort='pv' style="width: 10%;">搜索量</th>
            <th class="head1 sortable" data-sort='click' style="width: 10%;">点击量</th>
            <th class="head0 sortable" data-sort='ctr' style="width: 10%;">点击率</th>
            <th class="head1 sortable" data-sort='coverage' style="width: 10%;">点击转化率</th>
            <th class="head0 sortable" data-sort='avg_price' style="width: 10%;">市场均价</th>
            <th class="head1 sortable" data-sort='competition' style="width: 10%;">竞争度</th>
            <th class="head0" style="width: 10%;">推荐出价</th>
        </tr>
        </thead>
    </table>
    <table cellspacing="0" cellpadding="0" border="0" class="metrotable datatable" id="keywords_rcm">
        <thead>
            <tr style="height:51px;">
                <th style="width: 5%;"></th>
                <th style="width: 25%;"></th>
                <th style="width: 10%;"></th>
                <th style="width: 10%;"></th>
                <th style="width: 10%;"></th>
                <th style="width: 10%;"></th>
                <th style="width: 10%;"></th>
                <th style="width: 10%;"></th>
                <th style="width: 10%;"></th>
            </tr>
        </thead>
        <tbody id="keywords_tbody" class="recommends">
        <empty name="words">
            <tr><td colspan="9" style="font-size:18px;">无此种词类!!!</td></tr>
         <else/>
            <volist name="words" id="v"  key="i">
            <tr class="active" sinbad-word="{$v.word}">
                <td><input type="checkbox" class="checkit" value="{$v.word}" id="k_check_{$i}" data-item="checked"/></td>
                <td>
                    <label for="k_check_{$i}" style="cursor:pointer;width:150px;display:inline-block;">{$v.word}</label>
                    <span class="insertResult" style="width:auto;height:20px;line-height:20px;">
                         <volist name="v['tag_display']" id="d"  key="o">
                            <span style="width:20px;height:20px;line-height:20px;border-radius:50%;background:#229fdd;color:#fff;margin-left:4px;display:inline-block;">
                                {$d}
                            </span>
                        </volist>
                    </span>
                </td>
                <td>{$v.pv|round=0|display_str}</td>
                <td>{$v.click|round=0|display_str}</td>
                <td>{$v['ctr'] |round=2|display_str}%</td>
                <td>{$v['coverage'] | round=2 | display_str}%</td>
                <td>￥{$v.avg_price|round=2|display_str}</td>
                <td>
                    <div class="progress">
                        <div class="bar"><div class="value bluebar" style="width: {$v.width}%;"></div></div>
                    </div>
                </td>
                <td>
                    <div class="input-prepend small-price" style="wdith:60px;">
                        <span class="add-on">￥</span>
                        <input  type="text" style="width:38px;" id="keyword_price_{$i}" data-price="{$v['price']}" class="price smallprice currencyinput" name="price" value="{$v['price']}" readonly>
                    </div>
                </td>
            </tr>
            </volist>
        </empty>
    </tbody>
    </table>
</if>
</div>
